<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.prime.com.tr/ui">
    <head>
        <p:resources />
    </head>
    <body>
        <ui:composition template="./../Template/generalTemplate.xhtml">
            <ui:define name="content">
                <h:form id="salesForm" prependId="false">    
                    <p:panel  header="PurchaseOrder Brief Information" style="height:495px;">     
                        <div style="margin-top: 20px;margin-left: 50px;margin-right: 50px;">
                        <p:dataTable dynamic="true" emptyMessage="No Purchase Order Input" value="#{verifySalesOrderManagedBean.salesOrder}" var="o" paginator="true" rows="5">

                            <p:column>
                                <f:facet name="header">Purchase Order Id</f:facet>
                                #{o.id}
                            </p:column> 

                            <p:column>
                                <f:facet name="header">Company</f:facet>
                                #{o.customer.name}  
                            </p:column>

                            <p:column>
                                <f:facet name="header">Issuing Date</f:facet>
                                #{o.dateCreated}

                            </p:column>

                        </p:dataTable>
                        <br/><br/>
                        <p:commandButton  value="Verify Purchse Order"  actionListener="#{verifySalesOrderManagedBean.verifyPurchaseOrder}" />
                        </div>
                    </p:panel>

                </h:form>
            </ui:define>

        </ui:composition>

    </body>
</html>
